//
//  SHSearchTableCell.m
//  UI_CarHome
//
//  Created by dllo on 15/11/7.
//  Copyright (c) 2015年 沈浩. All rights reserved.
//

#import "SHSearchTableCell.h"

#define CWID self.contentView.frame.size.width
#define CHEI self.contentView.frame.size.height
@implementation SHSearchTableCell

- (void)dealloc
{
    [_titleLabel release];
    [_priceLabel release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView {
    self.titleLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.titleLabel];
    [_titleLabel release];
    
    self.priceLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.priceLabel];
    [_priceLabel release];
    self.priceLabel.textAlignment = NSTextAlignmentCenter;
}

- (void)layoutSubviews {
    self.titleLabel.frame = CGRectMake(10, 0, CWID / 2 - 10, 40);
    self.priceLabel.frame = CGRectMake(CWID / 2, 0, CWID / 2 - 20, 40);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
